## Civcraft: SC Mod Specialized Python Functions

import CvUtil
from CvPythonExtensions import *
import CivcraftSCUtils
import CivcraftSCCombat as scCombat
import CivcraftSCProduction as scProduction

# globals
gc = CyGlobalContext()

#
# Does combat between two units.
# argsList:
# pAttackUnit: CyUnit object of the attack unit
# pDefendUnit: CyUnit object of the defend unit
#
def combat(argsList):
    pAttackUnit, pDefendUnit = argsList
    
    scCombat.combat(pAttackUnit, pDefendUnit)
    return;


# 
# Creates the unit building in the plot that a building has started building
# with the correct amount of HP to start with.
# argsList:
# pCity: CyCity object where the city has been started.
# eBuildingType: The enumerated bulding type. Should be a BuildingTypes enumerated value.
#
def setUnitBuildingOnStartBuildingProduction(argsList):
    pCity, eBuildingType = argsList

    scProduction.setUnitBuildingOnStartBuildingProduction(pCity, eBuildingType)
    return

#
# Updates the unit building with HP and shields for one turn of construction.
# argsList:
# pUnit: CyUnit object of the unit to update
# eBuildingType: The enumerated building type. Should be a BuildingTypes enumerated value.
#
def updateUnitBuildingConstructionTurnHP(argsList):
    pUnit, eBuildingType = argsList

    scProduction.updateUnitBuildingConstructionTurnHP(pUnit, eBuildingType)
